// Copyright DustedPixels.com 2008. All rights reserved.

package com.dustedpixels.jasmin.cycletest;

/**
 * @author micapolos@gmail.com (Michal Pociecha-Los)
 */
public final class StaticMethodStateArgument {
  public static final class PublicState {
    public byte value = 0; 
  }
  
  public static final class PrivateState {
    public boolean reading = true;
    public byte temp = 0;
  }
  
  public static void process(PublicState publicState, PrivateState privateState) {
    if (privateState.reading) {
      privateState.temp = publicState.value;
      privateState.reading = false;
    } else {
      privateState.temp++;
      publicState.value = privateState.temp;
      privateState.reading = true;
    }
  }
}
